@extends("admin.layout.main")

@section("content")
    <?php $role = Session::get('authModule');?>
    <!--主页面头部信息-->
    <div class="page-header">
        <h1>
            创客管理
        </h1>
    </div>
    <!-- /.page-header -->

    <div class="page-header">
        <form>
            <a class="btn btn-xs btn-success" href="{{ route('admin.member.editCash',['id'=>$where['id']]) }}">
                资金调节
            </a>
            <label style="float: right">
                交易类型：
                <select name="type">
                    <option value="0">全部</option>
                    <option value="1" @if($where['type'] == 1) selected @endif>积分</option>
                    <option value="2" @if($where['type'] == 2) selected @endif>注册币</option>
                </select>
                <button class="btn btn-xs btn-primary" style="margin-top:-4px;">搜索</button>
            </label>
        </form>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <table id="simple-table" class="table  table-bordered table-hover" style="text-align: center;">
                <thead>
                <tr>
                    <th>变动时间</th>
                    <th>订单号</th>
                    <th>交易类型</th>
                    <th>变动金额</th>
                    <th>变动后金额</th>
                    <th>备注</th>
                </tr>
                </thead>

                <tbody>
                @foreach($data as $v)
                <tr>
                    <td>{{ $v->created_at }}</td>
                    <td>{{ $v->trade_no }}</td>
                    <td>@if($v->record_type==1)积分 @else 注册币 @endif</td>
                    <td>@if($v->income==1) + @else - @endif{{ $v->cash }}</td>
                    <td>{{ $v->after_cash }}</td>
                    <td>{{ $v->reasons }}</td>
                </tr>
                @endforeach
                </tbody>
            </table>
            {{ $data->appends($where)->links('admin.layout.page') }}
        </div>
    </div>
@endsection
